/*
 * @Author: your name
 * @Date: 2021-12-14 14:37:46
 * @LastEditTime: 2022-12-02
 * @LastEditors: JIAR
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \macc.admin.vue\src\views\common\deviceDetail\components\components\tableItems\columns.js
 */
import { i18nRender } from '@/locales';
const MAC = [
  {
    title: 'VLAN',
    align: 'center',
    dataIndex: 'vlanId',
  },
  {
    title: i18nRender('wirelessConfig.mac'),
    align: 'center',
    dataIndex: 'dstMac',
  },
  {
    title: i18nRender('deviceDetail.type'),
    align: 'center',
    dataIndex: 'macStatus',
    scopedSlots: { customRender: 'macStatus' },
  },
  {
    title: i18nRender('common.interface'),
    align: 'center',
    dataIndex: 'dstInterface',
  },
  {
    title: i18nRender('wirelessConfig.inputime'),
    align: 'center',
    dataIndex: 'updateTime',
    scopedSlots: { customRender: 'updateTime' },
  },
];
const ARP = [
  {
    title: i18nRender('deviceDetail.protocol'),
    align: 'center',
    dataIndex: 'protocol',
    scopedSlots: { customRender: 'protocol' },
  },
  {
    title: i18nRender('wanMultiOut.hisip'),
    align: 'center',
    dataIndex: 'ip',
    scopedSlots: { customRender: 'ip' },
  },
  {
    title: i18nRender('common.interface'),
    align: 'center',
    dataIndex: 'intf',
    scopedSlots: { customRender: 'intf' },
  },
  {
    title: i18nRender('wirelessConfig.mac'),
    align: 'center',
    dataIndex: 'mac',
  },
  {
    title: i18nRender('deviceDetail.liveTime'),
    align: 'center',
    dataIndex: 'age',
    scopedSlots: { customRender: 'age' },
  },
  {
    title: i18nRender('deviceDetail.type'),
    align: 'center',
    dataIndex: 'type',
  },
];
const DHCP_USER = [
  {
    title: i18nRender('wanMultiOut.hisip'),
    align: 'center',
    dataIndex: 'ip',
  },
  {
    title: i18nRender('wirelessConfig.mac'),
    align: 'center',
    dataIndex: 'mac',
  },
  {
    title: i18nRender('deviceDetail.remainingLease'),
    align: 'center',
    dataIndex: 'lease',
  },
  {
    title: i18nRender('deviceDetail.type'),
    align: 'center',
    dataIndex: 'type',
    scopedSlots: { customRender: 'type' },
  },
];
const ROUTE = [
  {
    title: i18nRender('deviceDetail.purposeNetwork'),
    align: 'center',
    dataIndex: 'network',
  },
  {
    title: i18nRender('wirelessConfig.zwlable'),
    align: 'center',
    dataIndex: 'networkmask',
  },
  {
    title: i18nRender('deviceDetail.nextHop'),
    align: 'center',
    dataIndex: 'nextHop',
  },
  {
    title: i18nRender('deviceDetail.routerType'),
    align: 'center',
    dataIndex: 'flags',
    scopedSlots: { customRender: 'flags' },
  },
  {
    title: i18nRender('common.nextIntfShort'),
    align: 'center',
    dataIndex: 'nextIntf',
    scopedSlots: { customRender: 'nextIntf' },
  },
];

const IPV6_ROUTE = [
  {
    title: i18nRender('deviceDetail.purposeNetwork'),
    align: 'center',
    dataIndex: 'network',
  },
  {
    title: i18nRender('wirelessConfig.zwlable'),
    align: 'center',
    dataIndex: 'networkmask',
  },
  {
    title: i18nRender('deviceDetail.nextHop'),
    align: 'center',
    dataIndex: 'nextHop',
  },
  {
    title: i18nRender('deviceDetail.routerType'),
    align: 'center',
    dataIndex: 'flags',
    scopedSlots: { customRender: 'flags' },
  },
  {
    title: i18nRender('common.nextIntfShort'),
    align: 'center',
    dataIndex: 'nextIntf',
    scopedSlots: { customRender: 'nextIntf' },
  },
];

const DHCP_SNOOPING = [
  {
    title: i18nRender('wanMultiOut.hisip'),
    align: 'center',
    dataIndex: 'ip',
  },
  {
    title: i18nRender('wirelessConfig.mac'),
    align: 'center',
    dataIndex: 'mac',
  },
  {
    title: i18nRender('common.port'),
    align: 'center',
    dataIndex: 'interfaceName',
  },
  {
    title: 'VLAN ID',
    align: 'center',
    dataIndex: 'vlanId',
  },
  {
    title: i18nRender('deviceDetail.period'),
    align: 'center',
    dataIndex: 'lease',
  },
];
const INTF_PACKET = [
  {
    title: i18nRender('common.port'),
    align: 'center',
    dataIndex: 'interfaceShort',
  },
  {
    title: i18nRender('deviceDetail.inputOutputTraffic'),
    align: 'center',
    dataIndex: 'flow',
    scopedSlots: { customRender: 'flow' },
  },
  {
    title: i18nRender('deviceDetail.inputOutputRate'),
    align: 'center',
    dataIndex: 'speed',
    scopedSlots: { customRender: 'speed' },
  },
  {
    title: i18nRender('common.getSendMessage'),
    align: 'center',
    dataIndex: 'message',
    scopedSlots: { customRender: 'message' },
  },
  {
    title: i18nRender('deviceDetail.CRCOrFCSErrorPacket'),
    align: 'center',
    dataIndex: 'Epackt',
    scopedSlots: { customRender: 'Epackt' },
  },
  {
    title: i18nRender('deviceDetail.WrongDataPacket'),
    align: 'center',
    dataIndex: 'Bpackt',
    scopedSlots: { customRender: 'Bpackt' },
  },
  {
    title: i18nRender('deviceDetail.conflictNum'),
    align: 'center',
    dataIndex: 'collision',
  },
];
const POE = [
  {
    title: i18nRender('common.port'),
    align: 'center',
    dataIndex: 'alias',
  },
  {
    title: i18nRender('deviceDetail.capable'),
    align: 'center',
    dataIndex: 'poeAdminStatus',
    scopedSlots: { customRender: 'poeAdminStatus' },
  },
  {
    title: i18nRender('deviceDetail.status'),
    align: 'center',
    dataIndex: 'poeStatus',
    scopedSlots: { customRender: 'poeStatus' },
  },
  {
    title: i18nRender('deviceDetail.power'),
    align: 'center',
    dataIndex: 'powerUsed',
    scopedSlots: { customRender: 'powerUsed' },
  },
  {
    title: 'PD class',
    align: 'center',
    dataIndex: 'pdClass',
    scopedSlots: { customRender: 'pdClass' },
  },
  {
    title: i18nRender('deviceDetail.description'),
    align: 'center',
    dataIndex: 'poeStatusExtraInfo',
    scopedSlots: { customRender: 'poeStatusExtraInfo' },
  },
];

const IPV6_NEIGHBORS = [
  {
    title: 'MAC',
    align: 'center',
    dataIndex: 'mac',
  },
  {
    title: i18nRender('deviceDetail.IPv6Address'),
    align: 'center',
    dataIndex: 'ipv6',
  },
  {
    title: i18nRender('common.interface'),
    align: 'center',
    dataIndex: 'intf',
  },
  {
    title: i18nRender('deviceDetail.type'),
    align: 'center',
    dataIndex: 'type',
    scopedSlots: { customRender: 'ipv6NeighborsType' },
  },
  {
    title: i18nRender('common.status'),
    align: 'center',
    dataIndex: 'state',
    scopedSlots: { customRender: 'ipv6NeighborsState' },
  },
];

export {
  MAC,
  ARP,
  DHCP_USER,
  ROUTE,
  IPV6_ROUTE,
  DHCP_SNOOPING,
  INTF_PACKET,
  POE,
  IPV6_NEIGHBORS,
};
